package site.marqstree.latte.core.delegates.bottom;

import java.util.LinkedHashMap;

/*
 * 项目名: EleCommerce
 * 包名: site.marqstree.latte.core.delegates.bottom
 * 文件名: ItemBuilder
 * 创建者: marqstree
 * 创建时间: 2020/1/21 9:54
 * 描述: TODO
 */
public final class ItemBuilder {

    private final LinkedHashMap<BottomTabBean,BottomItemDelegate> ITEMS = new LinkedHashMap<>();

    static ItemBuilder builder(){
        return new ItemBuilder();
    }

    public final ItemBuilder addItem(BottomTabBean bean,BottomItemDelegate delegate){
        ITEMS.put(bean,delegate);
        return this;
    }

    public final ItemBuilder addItems(LinkedHashMap<BottomTabBean,BottomItemDelegate> items){
        ITEMS.putAll(items);
        return this;
    }

    public final LinkedHashMap<BottomTabBean,BottomItemDelegate> build(){
        return ITEMS;
    }
}
